package com.lxp.ssh2.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lxp.ssh2.dao.CompanyDAO;
import com.lxp.ssh2.po.Company;
import com.lxp.ssh2.service.CompanyService;
import com.lxp.ssh2.vo.Page;
import com.lxp.ssh2.vo.PageRequest;


@Service
public class CompanyServiceImpl implements CompanyService{

	@Autowired
	private CompanyDAO companyDAO;
	
	
	@Override
	public List<Company> findAll() {
		
		return companyDAO.findAll();
	}


	/* (non-Javadoc)
	 * @see com.lxp.ssh2.service.CompanyService#findPage(int, int)
	 */
	@Override
	public Page<Company> findPage(PageRequest pageRequest){
		return companyDAO.findByPageRequest(pageRequest);
	}

}
